<?php 
global $_W,$_GPC;
include MODULE_ROOT.'/inc/mobile/__init.php';

$title = "订单详情";
load()->model('mc');

$id = intval($_GPC['id']);

$sql = "SELECT * FROM ".tablename('imeepos_runner3_recive')." WHERE uniacid = :uniacid AND taskid = :taskid";
$params = array(':uniacid'=>$_W['uniacid'],':taskid'=>$id);
$recive = pdo_fetch($sql,$params);

$sql = "SELECT * FROM ".tablename('imeepos_runner3_tasks')." WHERE id = :id";
$params = array(':id'=>$recive['taskid']);
$task = pdo_fetch($sql,$params);


$sql = "SELECT * FROM ".tablename('imeepos_runner3_member')." WHERE uniacid = :uniacid AND openid = :openid";
$params = array(':uniacid'=>$_W['uniacid'],':openid'=>$recive['openid']);
$user = pdo_fetch($sql,$params);

$_pjax = trim($_GPC['_pjax']);

$template_content = $template.'/home/detail';

if($_W['isajax']){
	include $this->template($template_content,TEMPLATE_FETCH);
}else{
	include $this->template($template.'/index');
}